<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
    <!-- jstl和standard jar包-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="resources/css/bootstrap.min.css">
<title>所有的书籍</title>
</head>
<body>
<h1>${userName},你好!!</h1>

	<table class="table table-bordered table-hover" >
		<thead>
			<tr>
				<th style="text-align: center;">书名</th>
				<th style="text-align: center;">简介</th>
				<th style="text-align: center;">作者</th>
				<th style="text-align: center;">操作</th>
			</tr>
		</thead>
		
		<tbody>
			<core:forEach var="book" items="${books}">
				<tr>
					<td ><a href="book/${book.id}">${book.title}</a></td>
					<td>${book.brief}</td>
					<td>${book.author}</td>
					<td align="center">
					<a href="book/delete?id=${book.id}" name="delete">删除</a>/
					<a href="book/edit?id=${book.id}" name="edit">修改</a>
					</td>
				    
				</tr>
			</core:forEach>
		</tbody>
		
	</table>
	<a class="btn btn-primary" href="book/add" >添加</a>
</body>
</html>